import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        redirect: '/show/DigitalFarm',
    },
    {
        path: '/login',
        name: 'login',
    },
    {
        path: '/show',
        name: 'show',
        component: () => import('@/components/common/layout'),
        children: [
            {
                path: 'DigitalFarm',
                name: 'DigitalFarm',
                meta: {
                    reamks: '数字农牧场管理平台',
                },
                component: () => import('../views/DigitalFarm/index.vue'),
            },
            {
                path: 'DigitalVillage',
                name: 'DigitalVillage',
                meta: {
                    reamks: '数字乡村平台',
                },
                component: () => import('../views/DigitalVillage/index.vue'),
            },
            {
                path: 'AgriculturalSharing',
                name: 'AgriculturalSharing',
                meta: {
                    reamks: '农业大数据归集共享平台',
                },
                component: () => import('../views/AgriculturalSharing/index.vue'),
            },
            {
                path: 'SmartBuilding',
                name: 'SmartBuilding',
                meta: {
                    reamks: '智慧党建平台',
                },
                component: () => import('../views/SmartBuilding/index.vue'),
            },
            {
                path: 'RuralEcommerceCultivation',
                name: 'RuralEcommerceCultivation',
                meta: {
                    reamks: '农村电商培育平台',
                },
                component: () => import('../views/RuralEcommerceCultivation/index.vue'),
            },

            {
                path: 'IntelligentDetectionEnvironment',
                name: 'IntelligentDetectionEnvironment',
                meta: {
                    reamks: '城乡人居环境智能检测平台',
                },
                component: () => import('../views/IntelligentDetectionEnvironment/index.vue'),
            },
            {
                path: 'AgriculturalProductSafety',
                name: 'AgriculturalProductSafety',
                meta: {
                    reamks: '农产品安全溯源检测平台',
                },
                component: () => import('../views/AgriculturalProductSafety/index.vue'),
            },
            {
                path: 'DigitalAgricultureRuralService',
                name: 'DigitalAgricultureRuralService',
                meta: {
                    reamks: '数字农业农村服务平台',
                },
                component: () => import('../views/DigitalAgricultureRuralService/index.vue'),
            },
            {
                path: 'RuralDigitalGovernance',
                name: 'RuralDigitalGovernance',
                meta: {
                    reamks: '乡村数字治理平台',
                },
                component: () => import('../views/RuralDigitalGovernance/index.vue'),
            },
        ],
    },
];

const router = new VueRouter({
    routes,
});

export default router;
